package org.agent.aigccore.utils;

import org.agent.aigccore.model.po.UserInfoPO;
import org.agent.aigccore.model.vo.UserVO;

public class UserConverter {
    
    public static UserVO convertToUserVO(UserInfoPO userInfoPO) {
        if (userInfoPO == null) {
            return null;
        }
        
        UserVO userVO = new UserVO();
        userVO.setUserId(userInfoPO.getUserId());
        userVO.setUsername(userInfoPO.getUsername());
        userVO.setEmail(userInfoPO.getEmail());
        userVO.setPhone(userInfoPO.getPhone());
        userVO.setRole(userInfoPO.getRole());
        userVO.setStatus(userInfoPO.getStatus());
        userVO.setLastLoginTime(userInfoPO.getLastLoginTime());
        userVO.setGmtCreate(userInfoPO.getGmtCreate());
        userVO.setGmtModified(userInfoPO.getGmtModified());
        userVO.setCreator(userInfoPO.getCreator());
        userVO.setModifier(userInfoPO.getModifier());
        userVO.setName(userInfoPO.getName());
        userVO.setIdCard(userInfoPO.getIdCard());
        userVO.setRemark(userInfoPO.getRemark());
        
        return userVO;
    }
}